import request from '@/utils/request'

/**
 * 收货地址分页查询
 * @param {查询条件} data
 */
export function listShippingAddress(query) {
  return request({
    url: 'business/ShippingAddress/list',
    method: 'get',
    params: query
  })
}

/**
 * 新增收货地址
 * @param data
 */
export function addShippingAddress(data) {
  return request({
    url: 'business/ShippingAddress',
    method: 'post',
    data: data
  })
}
/**
 * 修改收货地址
 * @param data
 */
export function updateShippingAddress(data) {
  return request({
    url: 'business/ShippingAddress',
    method: 'PUT',
    data: data
  })
}
/**
 * 获取收货地址详情
 * @param {Id}
 */
export function getShippingAddress(id) {
  return request({
    url: 'business/ShippingAddress/' + id,
    method: 'get'
  })
}

/**
 * 删除收货地址
 * @param {主键} pid
 */
export function delShippingAddress(pid) {
  return request({
    url: 'business/ShippingAddress/' + pid,
    method: 'delete'
  })
}
